<template>
	<view>
		<uni-nav-bar fixed="true" statusBar="true" backgroundColor="#007AFF" color="#fff">
			<template>
				<view class="title">添加信息</view>
			</template>
			<template slot="left">
				<navigator url="/pages/zqmanage13/zqmanage13" hover-class="none">
					<uni-icons type="arrowleft" size="30" color="#fff"></uni-icons>
				</navigator>
			</template>
		</uni-nav-bar>
		<view class="padding30">
			<view class="editItem">
				<view class="flex">
					<view class="Editname">姓名：</view>
					<input type="text" value="" placeholder="请输入姓名" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">性别：</view>
					<!-- <input type="text" value="男" class="inputEdit"> -->
					<radio-group name="">
						<label>
							<radio value="" checked="true" /><text class="xuanxiangka">男</text>
							<radio value="" /><text class="font32">女</text>
						</label>
					</radio-group>
				</view>
				<view class=" flex">
					<view class="Editname">身份证号：</view>
					<input type="text" placeholder="请输入身份证号" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">出身年月：</view>
					<picker mode="date" :value="date" @change="bindDateChange">
						<!-- <view class="uni-input">{{date}}</view> -->
						<input type="text" :value="date" placeholder="请选择" class="inputEdit">
					</picker>
				</view>
				<view class=" flex">
					<view class="Editname">家庭住址：</view>
					<input type="text" value="" placeholder="请选择" class="inputEdit">
				</view>
			</view>
			<view class="editItem">
				<view class=" flex">
					<view class="Editname">单位名称：</view>
					<input type="text" value="" placeholder="请输入" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">行业：</view>
					<input type="text" value="" placeholder="请输入" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">单位地址：</view>
					<input type="text" value="" placeholder="请选择" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">职务：</view>
					<input type="text" value="" placeholder="请输入" class="inputEdit">
				</view>
			</view>
			<view class="editItem">
				<view class=" flex">
					<view class="Editname">毕业院校：</view>
					<input type="text" value="" placeholder="请选择" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">班级：</view>
					<input type="text" placeholder="请选择" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">专业：</view>
					<input type="text" placeholder="请选择" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">毕业时间：</view>
					<input type="text" placeholder="请选择" class="inputEdit">
				</view>
				<view class=" flex">
					<view class="Editname">所持证书：</view>
					<input type="text" placeholder="请输入" class="inputEdit">
				</view>
			</view>
			<view>
				<view class=" flex">
					<view class="Editname">兴趣爱好：</view>
					<input type="text" placeholder="请输入" class="inputEdit">
				</view>
			</view>
		</view>
		<view class="queDingBtn" @click="querenTianjia">确定添加</view>
	</view>

</template>

<script>
	export default {
		data() {
			const currentDate = this.getDate({
				format: true
			})
			return {
				date: '',
			}
		},
		methods: {
			querenTianjia:function(){
				uni.showToast({
					title:'添加成功',
					duration:1500
				})
			},
			bindDateChange: function(e) {
				this.date = e.target.value
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();

				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			}
		}
	}
</script>

<style>
	page {
		font-size: 30rpx;
		/* padding-bottom: 90rpx; */
	}

	.inputEdit {
		/* border: 1px solid red; */
		width: 500rpx;
	}

	.Editname {
		font-size: 32rpx;
	}

	.flex {
		display: flex;
		padding: 20rpx 0;
		/* border-bottom: 1px solid #CCCCCC; */
		color: #666666;
	}

	.title {
		text-align: center;
		width: 100%;
	}

	.editItem {
		border-bottom: 20rpx solid #F8F8F8;
	}

	.queDingBtn {
		width: 88vw;
		height: 80rpx;
		color: #fff;
		margin-bottom: 50rpx;
		font-size: 30rpx;
		text-align: center;
		background-color: #007AFF;
		line-height: 80rpx;
		border-radius: 40rpx;
		margin: 50rpx auto;
	}

	.xuanxiangka {
		margin-right: 50rpx;
	}

	.font32 {
		font-size: 32rpx;
	}
</style>
